<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-row>
      <el-col :span='22' :xs='24'>
        <el-form ref="form" :rules="rules" label-width="100px" id="mvcfm">
          <el-button @click="popNoteAdd('')" type='primary' size="mini">添加注解</el-button>
          <div class="form-unit">
            <span class="mvc-title-left"> 历史 </span>
          </div>
          <el-table>
            <el-table-column label="操作" align="center" width='100' type=''>
              <template slot-scope="scope">
                <el-dropdown trigger="click">
                  <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right"></i></span>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item>
                      <el-link @click="gotoPage(''+vueparams+'')">查看明细</el-link>
                    </el-dropdown-item>
                    <el-dropdown-item>
                      <el-link @click="gotoPage(''+vueparams+'')">修改</el-link>
                    </el-dropdown-item>
                    <el-dropdown-item>
                      <el-link @click="gotoPage(''+vueparams+'')">删除</el-link>
                    </el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
              </template>
            </el-table-column>
            <el-table-column label="设备名称" prop="">
            </el-table-column>
            <el-table-column label="设备型号" prop="">
            </el-table-column>
            <el-table-column label="设备规格" prop="">
            </el-table-column>
            <el-table-column label="制造商名称" prop="">
            </el-table-column>
            <el-table-column label="制造商联系人" prop="">
            </el-table-column>
            <el-table-column label="制造商联系电话" prop="">
            </el-table-column>
          </el-table>
        </el-form>
      </el-col>
      <el-col :span='2' :xs='24'>
        <el-menu default-active='active' class='menu-unit'>
          <el-menu-item v-for='item in Container'>
            <el-link @click="gotoMenu(item.url)" :type="'历史记录'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
    <el-dialog :visible.sync="NoteAddVisible" append-to-body>
      <NoteAdd v-if="NoteAddVisible" ref="NoteAdd" :popparams="popparams"> </NoteAdd>
    </el-dialog>
  </div>
</template>
<script>
  import request from '@/utils/request'
  import NoteAdd from "@/views/mes/produce/NoteAdd";
  export default {
    name: 'HistoryRecord',
    components: {
      NoteAdd,
    },
    props: ['popparams'],
    data() {
      return {
        NoteAddVisible: false,
        NoteAddValue: null,
        NoteAddDesc: null,
        vueparams: this.getVUEParams(""),
        loading: false,
        Container: null,
        rules: {}
      }
    },
    created() {
      this.loadContainerMenu({
        pid: "D797D94B97264F339A7F3838BB343F64",
        name: "生产设备右菜单",
        selected: "历史记录"
      }, 'Container', this.vueparams);
    },
    updated() {},
    mounted() {},
    methods: {
      popNoteAdd(params) {
        if (params != "") this.popparams = params + this.vueparams;
        this.NoteAddVisible = !this.NoteAddVisible;
      },
    },
  }
</script>
